Skip to content

Remove start pages - #1042

Merged
DilwoarH merged 2 commits into
mainfrom
389-remove-start-page-for-check-tool
Jun 28, 2025
Merged

Remove start pages#1042
DilwoarH merged 2 commits into
mainfrom
389-remove-start-page-for-check-tool

Conversation

@DilwoarH

@DilwoarH DilwoarH commented May 26, 2025

Copy link
Copy Markdown
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Start pages are no longer used as they have been superseded by deep linking.

Related Tickets & Documents

Added/updated tests?

We encourage you to keep the code coverage percentage at 80% and above.

  • Yes
  • No, and this is why: Please replace this line with details on why tests have not been included
  • I need help with writing tests

QA sign off

  • Code has been checked and approved
  • Design has been checked and approved
  • Product and business logic has been checked and proved

[optional] Are there any post-deployment tasks we need to perform?

[optional] Are there any dependencies on other PRs or Work?

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of missing session data to prevent errors and ensure users are redirected appropriately if required information is absent.
  • Refactor

    • Updated routing and step configuration to remove explicit template and back link properties.
    • Deleted unused start page templates for both "Check" and "Submit" services, streamlining the user interface.

@DilwoarH DilwoarH linked an issue May 26, 2025 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented May 26, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This update removes the start page for the "Check" tool by deleting its template and eliminating the route configuration that referenced it. Associated properties in route definitions are adjusted, and a session guard clause is added to the LPA details controller to ensure required data is present before proceeding.

Changes

File(s) Change Summary
src/views/check/start.html, src/views/submit/start.html Deleted the "start" page templates for both "Check" and "Submit" services.
src/routes/form-wizard/check/steps.js Removed template: 'check/start.html' property from the root route configuration.
src/routes/form-wizard/endpoint-submission-form/steps.js Removed backLink property from /lpa-details step configuration.
src/controllers/lpaDetailsController.js Added a guard clause to check for required session data before proceeding in locals method.
test/unit/lpaDetailsController.test.js Refactored tests to use shared setup and mocked session data for locals method testing.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Router
    participant CheckTool

    User->>Router: Navigate to Check tool from step-by-step page
    Router->>CheckTool: Directly enters tool (no start page)
    CheckTool-->>User: Presents tool interface
Loading

Assessment against linked issues

Objective Addressed Explanation
Remove start page for check tool; user goes straight into the tool from step-by-step page (#389)

Poem

A hop, a skip, the start page's gone,
Now straight to the tool, you journey on.
No more pausing at the gate,
Just check your data—don’t hesitate!
With routes now clear and templates few,
The rabbit cheers this change for you! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b69968d and b5b018c.

📒 Files selected for processing (6)
  • src/controllers/lpaDetailsController.js (1 hunks)
  • src/routes/form-wizard/check/steps.js (0 hunks)
  • src/routes/form-wizard/endpoint-submission-form/steps.js (0 hunks)
  • src/views/check/start.html (0 hunks)
  • src/views/submit/start.html (0 hunks)
  • test/unit/lpaDetailsController.test.js (2 hunks)
💤 Files with no reviewable changes (4)
  • src/routes/form-wizard/endpoint-submission-form/steps.js
  • src/routes/form-wizard/check/steps.js
  • src/views/submit/start.html
  • src/views/check/start.html
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/controllers/lpaDetailsController.js
  • test/unit/lpaDetailsController.test.js
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: run-tests / test
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions

github-actions Bot commented May 26, 2025

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 66.47% 5941 / 8937
🔵 Statements 66.47% 5941 / 8937
🔵 Functions 65.37% 253 / 387
🔵 Branches 79.64% 755 / 948
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/controllers/lpaDetailsController.js 100% 100% 100% 100%
src/routes/form-wizard/check/steps.js 0% 0% 0% 0% 1-131
src/routes/form-wizard/endpoint-submission-form/steps.js 0% 0% 0% 0% 1-50
Generated in workflow #1084 for commit facf949 by the Vitest Coverage Report Action

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fbb4541 and f66baa8.

📒 Files selected for processing (5)
  • src/controllers/lpaDetailsController.js (1 hunks)
  • src/routes/form-wizard/check/steps.js (0 hunks)
  • src/routes/form-wizard/endpoint-submission-form/steps.js (0 hunks)
  • src/views/check/start.html (0 hunks)
  • src/views/submit/start.html (0 hunks)
💤 Files with no reviewable changes (4)
  • src/routes/form-wizard/endpoint-submission-form/steps.js
  • src/routes/form-wizard/check/steps.js
  • src/views/check/start.html
  • src/views/submit/start.html
🧰 Additional context used
🪛 GitHub Check: test
src/controllers/lpaDetailsController.js

[failure] 6-6: test/unit/lpaDetailsController.test.js > lpaDetailsController > locals > should call super.locals
TypeError: Cannot read properties of undefined (reading 'get')
❯ LpaDetailsController.locals src/controllers/lpaDetailsController.js:6:27
❯ test/unit/lpaDetailsController.test.js:63:24


[failure] 6-6: test/unit/lpaDetailsController.test.js > lpaDetailsController > locals > should set localAuthorities options in the form
TypeError: Cannot read properties of undefined (reading 'get')
❯ LpaDetailsController.locals src/controllers/lpaDetailsController.js:6:27
❯ test/unit/lpaDetailsController.test.js:41:24

🪛 GitHub Actions: Unit test coverage report
src/controllers/lpaDetailsController.js

[error] 6-6: TypeError: Cannot read properties of undefined (reading 'get') in LpaDetailsController.locals method during unit tests.

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: run-tests / test
🔇 Additional comments (1)
src/controllers/lpaDetailsController.js (1)

10-10: Code looks good.

This line appears to be unchanged in functionality - just marked by the diff tool due to the surrounding changes.

Comment thread src/controllers/lpaDetailsController.js Outdated
@DilwoarH
DilwoarH force-pushed the 389-remove-start-page-for-check-tool branch from f66baa8 to b69968d Compare May 26, 2025 19:15

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f66baa8 and b69968d.

📒 Files selected for processing (6)
  • src/controllers/lpaDetailsController.js (1 hunks)
  • src/routes/form-wizard/check/steps.js (0 hunks)
  • src/routes/form-wizard/endpoint-submission-form/steps.js (0 hunks)
  • src/views/check/start.html (0 hunks)
  • src/views/submit/start.html (0 hunks)
  • test/unit/lpaDetailsController.test.js (1 hunks)
💤 Files with no reviewable changes (4)
  • src/routes/form-wizard/endpoint-submission-form/steps.js
  • src/routes/form-wizard/check/steps.js
  • src/views/check/start.html
  • src/views/submit/start.html
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/controllers/lpaDetailsController.js
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: run-tests / test
🔇 Additional comments (1)
test/unit/lpaDetailsController.test.js (1)

28-43: Good refactoring of test setup.

The shared beforeEach block improves test consistency and reduces code duplication. The mocking setup appropriately reflects the new session dependencies mentioned in the AI summary.

Comment thread test/unit/lpaDetailsController.test.js
Start pages are no longer used as they have been superseded by deep linking.
@DilwoarH
DilwoarH force-pushed the 389-remove-start-page-for-check-tool branch from b69968d to b5b018c Compare May 26, 2025 19:27
@DilwoarH
DilwoarH merged commit 22b0604 into main Jun 28, 2025
5 checks passed
@DilwoarH
DilwoarH deleted the 389-remove-start-page-for-check-tool branch June 28, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove start page for check tool

1 participant